You are not logged in.

#1 2005-09-22 22:29:05

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

curious...

Just wondering if there is a way to pass the current contents of pacman
(packages installed) to makeworld, if you wanted to rebuild only waht you had installed with just one command.
I know you can do an abs directory at a time, but if there are packages you dont have installed, you have to sift them out. so you have to manually install what you want. you can pass the install option straight to makeworld but this is not good as it would be all packages.

for example if you were running makeworld -c -i -b /base

you get both lilo and grub... take the -i option out and you then have to run packman -U every-bloody-individual.pkg.tar.gz..

this not a flame or derogitory in any manner just something that may be of use to some people, or there may be an option I've missed

Offline

#2 2005-09-22 23:38:40

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: curious...

install srcpac and do:

pacman -Q | cut -d' ' -f1 | paste -s | sed 's|s| |g' >filelist
srcpac -Sby `cat filelist`

Offline

#3 2005-09-23 05:09:07

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: curious...

thank you...

if there mas nothing from the aur installed that would have worked perfectly

it just stopped as it cant find those packages but perfect for a base install

Offline

#4 2005-09-23 06:06:56

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: curious...

It would be nice if there was this kind of functionality in makepkg...

try this as a script:

#!/bin/bash
pacman -Q | cut -d' ' -f1 | paste -s | sed 's|s| |g' >filelist
for e in `cat filelist`; do 
search=`find /var/abs/ -type d -name $e`
[ ! -z $search ] && echo $e >>doable
done
srcpac -Sby `cat doable`

Offline

#5 2005-09-23 09:26:52

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: curious...

will try this tonight and let you know

Offline

#6 2005-09-23 15:44:49

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: curious...

I asked to implement in pacman something similar, a "locally built" flag, so that you can recompile all and only the packages you have installed, but you haven't rebuilt from source. It would rebuild everything that has been installed from binaries, but not other software.

You can check this flyspray task: http://bugs.archlinux.org/index.php?do=details&id=3146
...and comment it, of course smile


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#7 2005-09-23 16:01:07

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: curious...

bardo wrote:

I asked to implement in pacman something similar, a "locally built" flag, so that you can recompile all and only the packages you have installed, but you haven't rebuilt from source. It would rebuild everything that has been installed from binaries, but not other software.

You can check this flyspray task: http://bugs.archlinux.org/index.php?do=details&id=3146
...and comment it, of course smile

srcpac does this already - it does not belong in pacman, as pacman knows nothing about abs itself.  That's like saying that the pistons in my car's engine should control my CD player - they're part of the same unit, but unrelated.

If you use srcpac all the time (it is a wrapper around pacman, accepting pacman's normal commands), "srcpac -Syu" will detect what you've built with scrpac and what you installed via pacaman, and will rebuild it.  Please note that you need to configure srcpac.conf properly.

Offline

#8 2005-09-23 16:36:42

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: curious...

so that's why my cd player has been acting up.
/me raises the hood on his car and beats on the engine block with a wrench

bad engine....bad


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#9 2005-09-23 16:41:57

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: curious...

also note doing srcpac -S package or pacman -S package after building it previously from source using srcpac -Sb package, will give you corruption errors (The -S switch to srcpac is actually doing a pacman -S). The reason for the error is becuase srcpac moves the built package into pacman's cache folder, so the database sums are going to differ from your built package (repo sums versus you built sums). I filed a bug report about this a while back and jason knows about. I found a temporary fix however, which was to hack srcpac to move the built package into its one designated cache folder (/var/cache/srcpac) instead of pacman's which solved the corruption errors, but won't reinstall your built version of it, only pacman's repo version.

Offline

#10 2005-09-23 17:42:17

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: curious...

phrakture wrote:

srcpac does this already - it does not belong in pacman, as pacman knows nothing about abs itself.  That's like saying that the pistons in my car's engine should control my CD player - they're part of the same unit, but unrelated.

I didn't know that pacman and abs should be two separate entities with no contact points. I liked Arch much more two minutes ago smile
Being serious, I think that abs and pacman integrate each other, that's what makes Arch debian or gentoo, when you choose it to be. If they don't talk to each other, your system is not fully self-aware, and you have to use other tools to make this binding. Because you need to bind them, don't you?

phrakture wrote:

If you use srcpac all the time (it is a wrapper around pacman, accepting pacman's normal commands), "srcpac -Syu" will detect what you've built with scrpac and what you installed via pacaman, and will rebuild it.  Please note that you need to configure srcpac.conf properly.

I didn't know this one, thanks for sharing smile
Still, it has the issue I pointed out above: srcpac is not in arch's "standard components" as pacman or the abs, I see it as some kind of "workaround"...
Well, all srcpac does could be implemented with a single flag in pacman (src/bin), and you need to make a wrapper out of it... To me, it's a waste of work.

My 2 cents wink


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#11 2005-09-23 18:08:47

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: curious...

as far as I know pacman only qualifies for core functionality by purpose. I guess it's the archway to only implement a minimal core and let the user build his own system around it.

Offline

#12 2005-09-23 18:09:53

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: curious...

bardo wrote:

I didn't know that pacman and abs should be two separate entities with no contact points. I liked Arch much more two minutes ago smile
Being serious, I think that abs and pacman integrate each other, that's what makes Arch debian or gentoo, when you choose it to be. If they don't talk to each other, your system is not fully self-aware, and you have to use other tools to make this binding. Because you need to bind them, don't you?
...
Still, it has the issue I pointed out above: srcpac is not in arch's "standard components" as pacman or the abs, I see it as some kind of "workaround"...
Well, all srcpac does could be implemented with a single flag in pacman (src/bin), and you need to make a wrapper out of it... To me, it's a waste of work.

I can tell you're not a developer.  But from a code perspective, coupling things causes so many headaches it's rediculous.  It's going to be easier to to make 3 apps "mv, cp, ls" than to make one app which does all those with flags (ala busybox).

This distinction is a primary unix philosophy.  One that linux is starting to lose.  The philosophy is: do one thing, and do it as good as you can, ignoring all other things.  There are technologies typically called "glue code" to handle the details... "cp" does one thing.  It copies.  Well.  If you want to do something more bizarre with it? "cp a b && cat b >> a && mv a b2" - ala bash "glue"

To show you how complicated things like this can get: go ahead an install busybox and try recursively moving a directory... the first error you get is "cannot move .. to blah" and it all goes downhill from there... i.e. don't do that in busybox - you lose files.  Obviously coupling "mv" with other programs was such a good idea.... /me sighs.

Scripts are not workarounds, they are solutions.  Did you know makepkg is a script just like srcpac (though one is bash, one is python)?  Did you know that namcap is also a script?  Did you know it is simply a glue-code layer on top of "ldd" and things like that?  Did you know the developers use namcap everyday?  And for the record, both namcap and srcpac were written by the same person.  As much as you want to say it's a "workaround", that then forces everything *but* pacman to be a workaround... makepkg, namecap, srcpac, pacman-optimize, etc

Offline

#13 2005-09-23 18:13:22

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: curious...

Penguin wrote:

It would be nice if there was this kind of functionality in makepkg...

try this as a script:

#!/bin/bash
pacman -Q | cut -d' ' -f1 | paste -s | sed 's|s| |g' >filelist
for e in `cat filelist`; do 
search=`find /var/abs/ -type d -name $e`
[ ! -z $search ] && echo $e >>doable
done
srcpac -Sby `cat doable`

....

thanks saved as treebuild and now doing its thing, I expect it to take some time, will post results back

Offline

#14 2005-09-23 18:21:45

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: curious...

if you run into a package that wont build for some reason and it quits you can do:

 cat doable | grep -n packagethatfailed

that'll give you the line number, then do:

sed -e '1,<numberspitbackfromgrep>d' -i doable

that'll delete all the lines(package entries) from the beginning up until the failed package. That way you can do:

srcpac -Sby `cat doable`

from where you left off at instead of running the script again and re-doing it all over again.

Offline

#15 2005-09-23 18:41:29

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: curious...

this is greatly appreciated, no hitches yet...


and fixes available before there are problems.. lol that's a first wink

Offline

#16 2005-09-23 18:58:28

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: curious...

first failure...

habak from fvwm url changed since added to abs as 404:not found error

not a problem run sed fix and off we go again, 127 packages done 670 to go !!

roll

but still will have completely moved to gcc4.00 then

Offline

#17 2005-09-23 19:01:19

bardo
Member
Registered: 2004-12-06
Posts: 96

Re: curious...

DISCLAIMER: all I wrote is IMVHO, and is not intended to sound arrogant as it could. I hope you want flag me as a troll smile


phrakture wrote:

I can tell you're not a developer.  But from a code perspective, coupling things causes so many headaches it's rediculous.  It's going to be easier to to make 3 apps "mv, cp, ls" than to make one app which does all those with flags (ala busybox).

This distinction is a primary unix philosophy.  One that linux is starting to lose.  The philosophy is: do one thing, and do it as good as you can, ignoring all other things.

I'm a dev, just a very newbie one. But before interesting in development, I've been using unix for years, I know it's philosophy and I think it's the best one. I know it's easier to make different apps for small jobs, but I think that's not the point in this discussion. Here we are talking about different things, you are pointing out the role of glue code, which srcpac surely is, and I'm not saying it is bad. I was proposing an underlying change not in the software, but in the way information about packages is stored.
Think it like a stacked structure: you have this informations stored at the base. Then, over it, you have basic tools, like pacman and the ones composing the abs. The third layer contains software like srcpac, that is nothing but a glue in this pyramid. You could grow the pyramid to an infinity of layers, as wide as you need, but there is one thing that will never change: the base will be composed of only one element, that is the information that your software manages.

Taken this, it is obvious that if you change a layer of the stack there are two other layers involved, the upper one and the lower one (only the upper one if you're talking of the base). So, if you modify packages' info, you have to adapt to this change all the software that directly accesses it.

phrakture wrote:

Scripts are not workarounds, they are solutions.  Did you know makepkg is a script just like srcpac (though one is bash, one is python)?  Did you know that namcap is also a script?  Did you know it is simply a glue-code layer on top of "ldd" and things like that?  Did you know the developers use namcap everyday?  And for the record, both namcap and srcpac were written by the same person.  As much as you want to say it's a "workaround", that then forces everything *but* pacman to be a workaround... makepkg, namecap, srcpac, pacman-optimize, etc

In this case, I think a script is a workaround, because it solves the problem from the wrong point of view. From the top, instead than from the bottom, if we want to keep the pyramid's metaphore.
Anyway, It's not true to say that the "srcpac way" looks at the problem only from the top, because it couldn't keep track of what was recompiled and what wasn't, so srcpac adds some other data to the base of the pyramid, but this data is accessible only to srcpac itself and overlying layers, not to the middle one, where pacman stands. Srcpac isn't glue code anymore, since it adds new features.
I see this as a flaw, and I thought that a way to correct it is to integrate srcpac's additional data into the already existing ones.

About other affirmations, I don't understand why you got so mad (if I caught it right). I actually know all those softwares are scripts, and I read some of the codes. I maintain a bunch of packages in the AUR, and I know what namcap is, I use it to make sure my builds have the right deps.
If you don't read my name everywhere, it doesn't mean that I don't do anything for the community, or that I don't know anything about Arch's tools.
I'm just asking, now that you know all this, why shouldn't I think this way? Isn't it just another opinion? Or are there some reasons why it is completely wrong?


dreaming in digital / living in realtime / thinking in binary / talking in ip / welcome to our world

Offline

#18 2005-09-23 19:36:50

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: curious...

so far 4 fails....

logrotate, mplayer,( mpg321 and habak two fails urls~) mplayer beacuse you need to instruct it to continue wth an unsupported gccversion.

not too bad though and it opens the door for cross-compiling a bit too..

although at the moment this is just a test on my own box that is i686

Offline

#19 2005-09-24 04:50:41

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: curious...

success....

two other failures but thats it and again they were for ropey urls..



many thanks penguin big_smile

Offline

#20 2006-05-06 13:44:50

IsSuE
Member
Registered: 2006-04-29
Posts: 309

Re: curious...

is srcpac still in developement or has its developer quit?
srcpac is a really nice thing, but it has some bugs in that really are annoying, as penguin stated a few lines above. Or is there a similar project?

Offline

#21 2006-05-06 18:26:53

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: curious...

IsSuE wrote:

is srcpac still in developement or has its developer quit?
srcpac is a really nice thing, but it has some bugs in that really are annoying, as penguin stated a few lines above. Or is there a similar project?

I made a bug report on fly spray about the corruption errors but it never got looked into.
I actually wrote something similar to srcpac that looks at abs instead of pacman's db which allows you to update your entire system once a package is in cvs. It also uses aurbuild's menu to veiw/edit the build files and builds as user with fakeroot and sudo to install and all that jazz I may post it in user-contributions someday...

Offline

#22 2006-05-27 21:05:02

napoleon
Member
Registered: 2005-04-03
Posts: 176

Re: curious...

Penguin wrote:

It would be nice if there was this kind of functionality in makepkg...

try this as a script:

#!/bin/bash
pacman -Q | cut -d' ' -f1 | paste -s | sed 's|s| |g' >filelist
for e in `cat filelist`; do 
search=`find /var/abs/ -type d -name $e`
[ ! -z $search ] && echo $e >>doable
done
srcpac -Sby `cat doable`

I just tried to use this script but it gives me the follwing:

[napoleon@archlinux ~]$ sudo ./allsrcpac
Password:
./allsrcpac: line 5: [: /var/abs/.sup/arch: binary operator expected

Help please.


A good friend will come and bail you out of jail...BUT a true friend will be sitting next to you saying, "Damn...that was fun!"

Offline

#23 2006-05-28 03:07:32

neotuli
Lazy Developer
From: London, UK
Registered: 2004-07-06
Posts: 1,204
Website

Re: curious...

IsSuE wrote:

is srcpac still in developement or has its developer quit?
srcpac is a really nice thing, but it has some bugs in that really are annoying, as penguin stated a few lines above. Or is there a similar project?

Xentac accepts patches wink


The suggestion box only accepts patches.

Offline

#24 2006-05-28 10:40:11

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: curious...

napoleon wrote:
Penguin wrote:

It would be nice if there was this kind of functionality in makepkg...

try this as a script:

#!/bin/bash
pacman -Q | cut -d' ' -f1 | paste -s | sed 's|s| |g' >filelist
for e in `cat filelist`; do 
search=`find /var/abs/ -type d -name $e`
[ ! -z $search ] && echo $e >>doable
done
srcpac -Sby `cat doable`

I just tried to use this script but it gives me the follwing:

[napoleon@archlinux ~]$ sudo ./allsrcpac
Password:
./allsrcpac: line 5: [: /var/abs/.sup/arch: binary operator expected

Help please.

try putting it in a for loop. for s in $search; do [ ! -z $s ] && echo $e >>doable; break; done

Offline

#25 2006-05-28 12:55:38

napoleon
Member
Registered: 2005-04-03
Posts: 176

Re: curious...

I bet from the following question you will figure that i am not a programmer anyway, thanks so far. I tried your suggestion ie

#!/bin/bash
pacman -Q | cut -d' ' -f1 | paste -s | sed 's|s| |g' >filelist
for e in `cat filelist`; do
search=`find /var/abs/ -type d -name $e`
for s in $search; do [ ! -z $s ] && echo $e >>doable; break; done
srcpac -Sby `cat doable`

and now it give me the following error:

[napoleon@archlinux ~]$ sudo ./allsrcpac
./allsrcpac: line 7: syntax error: unexpected end of file

thanks


A good friend will come and bail you out of jail...BUT a true friend will be sitting next to you saying, "Damn...that was fun!"

Offline

Board footer

Powered by FluxBB