Author Topic: mkrepo problem  (Read 6623 times)

Offline slax

  • Sr. Member
  • ****
  • Posts: 391
    • PCLinuxOS Gnome Edition
mkrepo problem
« on: September 22, 2009, 03:28:53 AM »
I'm had this problem several time, even on clean installs and i don't know why is it happening. Sometimes the mkrepo works sometimes it can't continue. Has anyone had this problem?

Code: [Select]
[pak@localhost ~]$ mkrepo -p "Slax <root@pclinux.in.rs>" --addpkgs

Using /home/pak as base for src tree.
These lines will be written to ~/.rpmmacros:

%_topdir        /home/pak/src/rpm
%_tmppath       /home/pak/src/tmp
%packager       Slax <root@pclinux.in.rs>

Build packages will be downloaded and installed

Continue? [Y/n] y
Continue? [Y/n] Y
Continue? [Y/n] Y
Continue? [Y/n]     

Also when mkrepo is used without the arguments, it gives the same error.



Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: mkrepo problem
« Reply #1 on: September 22, 2009, 09:25:40 AM »
Got It!
After installing pkgutils from synaptic, as user, not as root:
Code: [Select]
mkrepo -a -d "PCLinuxOS" -s "pclos" -v "PClinuxOS" -b "/home/(UserName)"
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline slax

  • Sr. Member
  • ****
  • Posts: 391
    • PCLinuxOS Gnome Edition
Re: mkrepo problem
« Reply #2 on: September 22, 2009, 02:24:35 PM »
I have pkgutils installed...

But mkrepo script wont work



Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: mkrepo problem
« Reply #3 on: September 22, 2009, 02:37:36 PM »
I have pkgutils installed...

But mkrepo script wont work

Did you try Joble's script or just 'mkrepo?'


Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: mkrepo problem
« Reply #4 on: September 22, 2009, 02:55:49 PM »
Been a while since I set it up, but it shouldn't need to download anything.  ???
One other thing, is this kde3 or kde4?  There is a separate pkgutils for kde4 to work with dolphin.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline slax

  • Sr. Member
  • ****
  • Posts: 391
    • PCLinuxOS Gnome Edition
Re: mkrepo problem
« Reply #5 on: September 24, 2009, 08:56:33 AM »
First, i installed fresh from kde4 remaster (from minime), and it didn't work, now i installed fresh minime 2009.2 with kde3.5 and agait it wont work....

Maybe it's something related to minime?

I'll try to manually create local repo, since i have no more ideas....

There is no error, the script just wont continue. I looked at the script, but i can't figure it out.



Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #6 on: September 24, 2009, 03:43:56 PM »
Is your system localized to a non US-english keyboard?  It looks like the script is not accepting your "Y" entry;  IIRC the script loops at the question untill it gets the input it expects..  if you just hit enter without typing Y, y, N,or n, it should continue assuming that you want the default selection "Y".


Also, mkrepo does install a handful of packages..  If someone has easy access (I'm at work), open the script up in a text editor and see if the list is out of date. 

I will try and take a look at the script when I get home (or you can post it as a txt file..). 

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #7 on: September 24, 2009, 08:54:58 PM »
Now that I'm home, I've managed to recreate Slax's problem..  the script's yorn function ("yes or no") hasn't changed, but I did notice that bash was updated yesterday.  Maybe there is a connection ????

When I wrote the synaptic-repair script I borrowed heavily from mkrepo, including the yorn function, it is also having the same issue with that function.  I will look into re-writing the function and will post back when I have good fix.

Offline slax

  • Sr. Member
  • ****
  • Posts: 391
    • PCLinuxOS Gnome Edition
Re: mkrepo problem
« Reply #8 on: September 25, 2009, 02:52:44 AM »
Thanx travisn000.
Keyboard is set to US, andit is the same if i press just enter.

I'll look into the script, but i don't think i have the knowledge to fix it.

If by some dumb luck i fix it, i'll post it here.



Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: mkrepo problem
« Reply #9 on: September 25, 2009, 09:26:20 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.

« Last Edit: September 25, 2009, 09:28:13 AM by travisn000 »

Offline slax

  • Sr. Member
  • ****
  • Posts: 391
    • PCLinuxOS Gnome Edition
Re: mkrepo problem
« Reply #10 on: September 26, 2009, 11:49:56 AM »
Thanx travisn000 :)

It finally works! It works with first while statement.

Thank you again



Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: mkrepo problem
« Reply #11 on: October 04, 2009, 04:30:25 PM »
Install dependencies does not seem to be working either, in pkgutilskde4.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: mkrepo problem
« Reply #12 on: October 04, 2009, 04:37:13 PM »
Install dependencies does not seem to be working either, in pkgutilskde4.

It isn't working in kde3 either. (I checked) And spec files are not recognized as spec files.


Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: mkrepo problem
« Reply #13 on: October 04, 2009, 04:45:36 PM »
Neal:  That must be new.  I used it in kde3 just yesterday.   ???
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: mkrepo problem
« Reply #14 on: October 04, 2009, 04:46:43 PM »
Odd, isn't it? ???