Author Topic: mkrepo problem  (Read 6626 times)

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #15 on: October 05, 2009, 02:27:15 PM »
The yorn function was used by stumpy in most all of his scripts requiring a yes / no type feedback. 

The changes mentioned above may have to be made for all of the scripts in the pkgutils package that use the yorn function.. there may be other changes needed as well; I haven't had much time for packaging lately, so I couldn't say for sure without having the scripts in front of me for reading / testing.

Offline Sleepy

  • Sr. Member
  • ****
  • Posts: 376
Re: mkrepo problem
« Reply #16 on: October 07, 2009, 06:52:52 AM »
..try replacing the yorn function in /usr/bin/mkrepo with the following one (as root):

Code: [Select]
# updated yorn function to work with new bash update

yorn () {
local s
while ! [[ $s =~ [ynYN] ]]; do
# while ! [[ $s == "Y" || $s == "y" || $s == "N" || $s == "n" ]]; do
read -p"$2" s
s=${s:-$1}
[ ${#s} -gt 1 ] && s=
done
echo -n $s|tr yn YN
}

..for some reason the new bash did not like the quotes in the while.. statement that surround the regexp "[ynYN]".  I also added a commented out (beginning with a # character) alternate line that does not use a regexp, so if you have difficulties, move the # character from the beginning of one while statement to the other one, save it, and try again.



I have a similar problem  but don't see the mkrepo file to be able to change it.
Any suggestion please?
Asus P5QL/EPU Motherboard,Pentium 4 3ghz dual core processor,1gb Kingston ram,Geforce EN210 graphics card.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #17 on: October 07, 2009, 07:31:57 AM »
Are you having the problem when running the mkrepo script, or having the problem with another script (ie. synaptic-repair)??  ..the same yorn function is used in a few different scripts in pclinuxos.

You should be able to locate the script by using the locate or find commands (most scripts are located in either /usr/bin or /usr/sbin):

Code: [Select]
locate mkrepo
locate synaptic-repair
etc..


Offline slax

  • Sr. Member
  • ****
  • Posts: 391
    • PCLinuxOS Gnome Edition
Re: mkrepo problem
« Reply #18 on: October 07, 2009, 08:08:38 AM »
Also addpkg  never worked for me...

it always says file.spec - not a spec or rpm file.

I tried to edit it, but no luck



Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: mkrepo problem
« Reply #19 on: October 07, 2009, 08:09:42 AM »
Also addpkg  never worked for me...

it always says file.spec - not a spec or rpm file.

I tried to edit it, but no luck

Same here.


Offline Sleepy

  • Sr. Member
  • ****
  • Posts: 376
Re: mkrepo problem
« Reply #20 on: October 07, 2009, 09:14:38 AM »
Are you having the problem when running the mkrepo script, or having the problem with another script (ie. synaptic-repair)??  ..the same yorn function is used in a few different scripts in pclinuxos.

You should be able to locate the script by using the locate or find commands (most scripts are located in either /usr/bin or /usr/sbin):

Code: [Select]
locate mkrepo
locate synaptic-repair
etc..



I located the correct file in Synaptic-repair but it wont let me save the new script,not even as root?
Asus P5QL/EPU Motherboard,Pentium 4 3ghz dual core processor,1gb Kingston ram,Geforce EN210 graphics card.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #21 on: October 07, 2009, 09:52:02 AM »
I don't think I will have time to fix them all until probably late tommarow night or friday, but I will see if I can put together an updated / fixed pkgutils package and synaptic-repair.

Are most people packaging on kde4 now, or do we still need to maintain two versions of pkgutils?



For those of you not using english as your default language and having problems with addpkg, you may need to look to this post by it's original author:

http://mypclinuxos.com/forum/index.php?topic=1613.msg13393#msg13393

..if this seems to be the issue, I would be more than happy to post the repaired scripts and let someone else take over localization & packaging (..I'm trying to get ready to go on vacation ;D)
« Last Edit: October 07, 2009, 09:55:09 AM by travisn000 »

Offline Sleepy

  • Sr. Member
  • ****
  • Posts: 376
Re: mkrepo problem
« Reply #22 on: October 07, 2009, 10:16:55 AM »
Managed  to save the file and it now runs.However when it finishes and asks'choose a repo to make active',it gives me a choice of repos but I cant get it to run.Doesn't seem to list a-whatever as before but perhaps it's me not adding the correct command??
Asus P5QL/EPU Motherboard,Pentium 4 3ghz dual core processor,1gb Kingston ram,Geforce EN210 graphics card.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #23 on: October 07, 2009, 10:30:56 AM »
Thanks for the heads-up.  I will do my best to go through all / most of the bash scripts that are generating errors before I leave for vacation, and make them compatible with the recent bash update...

..I probably won't get to it untill tomarrow evening or friday though.  ;)

Offline Sleepy

  • Sr. Member
  • ****
  • Posts: 376
Re: mkrepo problem
« Reply #24 on: October 07, 2009, 10:55:31 AM »
Thanks for the heads-up.  I will do my best to go through all / most of the bash scripts that are generating errors before I leave for vacation, and make them compatible with the recent bash update...

..I probably won't get to it untill tomarrow evening or friday though.  ;)

Hey just you make sure and enjoy your hols,that's more important friend  :)
Asus P5QL/EPU Motherboard,Pentium 4 3ghz dual core processor,1gb Kingston ram,Geforce EN210 graphics card.

Offline slax

  • Sr. Member
  • ****
  • Posts: 391
    • PCLinuxOS Gnome Edition
Re: mkrepo problem
« Reply #25 on: October 07, 2009, 12:15:12 PM »
Thank you Travis and enjoy the holidays  :)

Btw, addpkg is not working on an english system here
« Last Edit: October 07, 2009, 12:20:11 PM by slax »



Offline maik3531

  • Full Member
  • ***
  • Posts: 129
Re: addpkg problem
« Reply #26 on: October 07, 2009, 02:43:47 PM »
It is true also addpkg no longer works and it is up to bash 4.0    
The new Bash comes with  @ not find anything in variables
Example:

Bash 3.x
Code: [Select]
function lll() { ls -l --color "$@"| egrep "^d" ; ls -lXB "$@" 2>&-| egrep -v "^d|total "; }

Bash 4.0
Code: [Select]
function lll() { ls -l --color | egrep "^d" ; ls -lXB 2>&-| egrep -v "^d|total "; }

   
Unfortunately, I know how it does in brackets
Example:
Code: [Select]
av=($(apt-cache show ${pv[0]} 2>/dev/null))
IFS=$OFS
echo -ne "\r       \r"
ac=${#av[@]}

Edit: The problem with @ was/is a known Bug in the set-o nounset or set-u 'unset` occurs and since I had exactly the problem elsewhere, I assumed that it could here also pertain to this Bug.


-L DE
Es ist richtig auch addpkg funktioniert nicht mehr und es liegt an bash 4.0
Die neue Bash kommt mit @ nicht mehr zurecht in Variablen

Leider weiß ich wie man es in Klammern ändert
« Last Edit: October 09, 2009, 05:53:47 AM by maik3531 »
Please excuse my English

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #27 on: October 08, 2009, 11:55:33 PM »
Here are updated mkrepo and addpkg scripts that should work with bash v.4 (attached). 

Please test them out, but be aware that you will get an error about no package named task-packaging-kde4 with mkrepo if you allow it to install packages.   This happens because I just moved the list of required packages to a metapackage with the name task-packaging-kde4, but the package is not yet available in the repo.

If you want the metapackage to test also, here is the spec:

Quote from: task-packaging-kde4.spec
%define name   task-packaging-kde4
%define version 0.0.1
%define release %mkrel 1
%define Summary Installs the most commonly used items for packaging RPMs in PCLinuxOS's KDE4 desktop environment

# Do not build debug package
%define _enable_debug_packages   %{nil}
%define debug_package            %{nil}

Summary:   %Summary
Name:      %name
Version:   %version
Release:   %release
License:   GPL
Group:      Development/Tools
Group:      Tasks
BuildArch:   noarch
Requires:   pkgutils-kde4, rpm-build, rpm-pclinuxos-setup-build, autoconf2.1, autoconf, automake1.7, automake
#Provides:    
#Obsoletes:   none   
#Conflicts:   none
Packager:   travisn000

%description
task-packaging-kde4 is a meta-package that installs the most commonly used items for packaging RPMs in PCLinuxOS's KDE4 desktop environment.

This includes pkgutils-kde4, rpm-build, rpm-pclinuxos-setup-build, their dependencies, and current and legacy versions of autoconf and automake.

Once installed, any regular user on the system can use the mkrepo script to setup their personal home directory for building RPMs
as well as setting up a local repo in their home directory so that new packages can be tested for proper installation, function, and removal.

The mkrepo script is run with the following syntax for first time configuration:

mkrepo -a -d PCLinuxOS -v PCLinuxOS -s <pclos, or your PCLOS user name> -p <your PCLOS user name>


For more information on packaging, mkrepo, and other pkgutils scripts visit the Packaging section of the official PCLinuxOS forum.


%files
%defattr(-,root,root)


%changelog
* Fri Oct 09 2009 travisn000 <my username at g mail dot com> 0.0.1-1pclos2010
- new metapackage
- used by updated pkgutils' mkrepo script to install / verify all requirements for packaging



So far most of the problems with the new bash v4 seem to be caused by quotes around regexp's, etc within conditional statements..
..I will look at the other pkgutils scripts (gbr, gcr, rmvpkg) tomarrow; again, please let me know of any currently known issues

[attachment deleted by admin]

Offline maik3531

  • Full Member
  • ***
  • Posts: 129
Re: mkrepo problem
« Reply #28 on: October 09, 2009, 05:46:55 AM »
Thank you sincerely and here is the updated version of addpkg for German users

[attachment deleted by admin]
Please excuse my English

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #29 on: October 09, 2009, 12:30:18 PM »
Here are links to the srpm / rpms for a new pkgutils-kde4 and task-packaging-kde4 packages:
(..uploaded to the wifes' website  ;D)

RPMS:
pkgutils-kde4-0.1.3-1pclos2010.noarch.rpm
task-packaging-kde4-0.0.1-1pclos2010.noarch.rpm

SRPMS:
pkgutils-kde4-0.1.3-1pclos2010.src.rpm
task-packaging-kde4-0.0.1-1pclos2010.src.rpm

I haven't uploaded them to contribs, as seem to have wiped the server URL & password from my HD with a recent re-install..  :-[ :-X :-\
If someone would test them out, and do me the favor of uploading it would be appreciated.


Just to be clear, this is for kde4 only.. this pkgutils srpm does not have kde3 support like the previous one (..its time to move on!)

Also, if someone wants to take the time to localize and add translations to the scripts & specs, feel free.. but I don't currently have time.
« Last Edit: October 09, 2009, 12:32:30 PM by travisn000 »