![]() |
![]() |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
Martijn Dekker <> wrote:
[snip] > They actually do (see 'man sed' under Addresses), but the manual page is > very terse, as they usually are. Google for "sed tutorial" and you'll > find plenty to get you started. Thanks for the tip. [snip] > I don't remember exactly. Lots of experimenting. I probably used a > tutorial. I spell out the manual pages and try stuff for myself. Good idea. I've only tinkered with sed a little. [snip] > I could be wrong, but I would think launching separate processes is more > expensive than environment space. What do you mean by "expensive"? I've never bumped into a limit because I had too many processes running. I have however crashed xargs because of too much environment space being used. In fact, I regularly use a modified xargs compiled to allow more environment space. I guess I hog up a lot of space. [snip] > One tool I wrote that uses 'sed' quite a bit is 'dependencies', see: > Thanks for the info. I'll try to remember your tool in case I need it someday. And the site it is hosted on looks interesting. -Joe |
|
|
|
#12 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
ciol <> wrote:
> I understand /nothing/. I know this can be hard. You are asking questions. That is a good start. > - Why do you use installpkg -warn and not tar? I use "installpkg -warn" to query a Slackware package. It is the correct tool to use. Patrick Volkerding, the author of Slackware, has provided us with tools that work together. The man page for installpkg lists these commands in the "SEE ALSO" section: makepkg, removepkg, explodepkg, pkgtool, upgradepkg These commands work together. For example, makepkg (not tar) makes the packages, and installpkg installs or queries the packages. > - What is this the difference between installpkg -warn and tar tzf > (except installpkg does not list directories)? Slackware packages are not, strictly speaking, the same as archives made by tar. What I understand is that a Slackware package is similar to a tar archive, but in what ways it is different I do not know fully. > - Why do you skip only 3 lines, whereas you can't know how many lines > installpkg -warn will write? I'm not interested in how many lines -warn will write. I skip the first 3, because "installpkg -warn" writes three lines of explanation before it lists the files. Here is an example that I just now ran: vvv root@airlink9:/opt/SAM/config/perm/cdrom$ installpkg -warn lame-3.95.1-x86.tgz #### Scanning the contents of lame-3.95.1-x86.tgz... The following files will be overwritten when installing this package. Be sure they aren't important before you install this package: -rw-r--r-- root/root 605 2007-11-24 21:17 install/slack-desc -rwxr-xr-x root/root 323812 2007-11-23 14:33 usr/local/bin/lame -rw-r--r-- root/root 25294 2004-01-19 17:42 usr/local/doc/lame-3.95.1/COPYING -rw-r--r-- root/root 377 2004-01-19 17:42 usr/local/doc/lame-3.95.1/README -rw-r--r-- root/root 424 2004-01-19 17:42 usr/local/doc/lame-3.95.1/URL.html -rw-r--r-- root/root 26011 2007-11-23 14:37 usr/local/man/man1/lame.1 -rw-r--r-- root/root 325 2007-11-24 19:02 usr/local/slack-desc.txt ^^^ In this example the three lines vvv #### Scanning the contents of lame-3.95.1-x86.tgz... The following files will be overwritten when installing this package. Be sure they aren't important before you install this package: ^^^ are not of interest to me. The lines that come after are of interest. Look at my script checkpkg and you will see that it does this: installpkg -warn $1 | skip 3 > $env_scratch/checkpkg.dat This causes the output of "installpkg -warn", less the first three lines, to be written to file checkpkg.dat. Later in the script I use the file checkpkg.dat to check for collisions. > - Why in doinst.sh from ktorrent, there is: > ( cd usr/lib ; rm -rf libktorrent.so ) > ( cd usr/lib ; ln -sf libktorrent-2.2.4.so libktorrent.so ) > ln -sf is not enough? Yes... It would seem so. Yet, there is no harm in this. I hope this helps. -Joe |
|
|
|
#13 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
On Thu, 03 Jan 2008 13:22:10 +0100, ciol wrote:
> Hi, when I attempt to see if there is no conflicts with the -warn > option, installpkg says that all files will be overwritten: > > The following files will be overwritten when installing this package. Be > sure they aren't important before you install this package: [here there > is the list of all the files in the package] > > (The package is not already installed). It happens for all packages. Please provide at least these infos: # uname -ors # ls /var/log/packages/| grep -E '(tar-|pkgtool)' and also list one or a few packages you tested that had the problem ("all" is too wide to check and the packages I testd with -warn didn't raise any problem) |
|
|
|
#14 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
loki harfagr wrote:
> That's the truth, this option is important when you install stuff that may > have to live in the same space not necessarily the same time, the '-warn' > indicators could be precious if you stack up different kernels/modules > for instance. ???? -- On dira ce qu'on voudra, j'étais pas un petit loubard comme les autres. (Rocky) |
|
|
|
#15 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
Martijn Dekker <> wrote:
[snip] > They actually do (see 'man sed' under Addresses), but the manual page is > very terse, as they usually are. Google for "sed tutorial" and you'll > find plenty to get you started. Thanks for the tip. [snip] > I don't remember exactly. Lots of experimenting. I probably used a > tutorial. I spell out the manual pages and try stuff for myself. Good idea. I've only tinkered with sed a little. [snip] > I could be wrong, but I would think launching separate processes is more > expensive than environment space. What do you mean by "expensive"? I've never bumped into a limit because I had too many processes running. I have however crashed xargs because of too much environment space being used. In fact, I regularly use a modified xargs compiled to allow more environment space. I guess I hog up a lot of space. [snip] > One tool I wrote that uses 'sed' quite a bit is 'dependencies', see: > Thanks for the info. I'll try to remember your tool in case I need it someday. And the site it is hosted on looks interesting. -Joe |
|
|
|
#16 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
On 2008-01-04, Tom N <tom@somewhere.invalid> wrote:
> On 2008-01-03, ciol <ciol13@gmail.com> wrote: >> Maybe Martijn is right: it is the intended behavior (therefore it is >> useless, one can simply use 'tar tzf') > > That's how it has always worked for me. (12.0) > > What is it that you expect it do? > > If you have less, it is much handier than tar for > examining packages. Just less <package name.tgz> And guess what less does? ![]() From /usr/bin/lesspipe.sh: ... # This is a preprocessor for 'less'. It is used when this environment # variable is set: LESSOPEN="|lesspipe.sh %s" lesspipe() { case "$1" in *.tar) tar tvvf "$1" 2>/dev/null ;; # View contents of .tar and .tgz files *.tgz) tar tzvvf "$1" 2>/dev/null ;; ... -RW |
|
|
|
#17 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
Joseph H. Rosevear wrote:
> I will provide skip and grab > also if you or someone cares to see them. I'd be glad to see them. Arigato. -- On dira ce qu'on voudra, j'étais pas un petit loubard comme les autres. (Rocky) |
|
|
|
#18 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
Joseph H. Rosevear wrote:
> I will provide skip and grab > also if you or someone cares to see them. I'd be glad to see them. Arigato. -- On dira ce qu'on voudra, j'étais pas un petit loubard comme les autres. (Rocky) |
|
|
|
#19 |
|
Guest
Posts: n/a
|
Re: [OT] shell environment size
Beej Jorgensen <> wrote:
> Joseph H. Rosevear <> wrote: > >I wrote my skip and grab as scripts not functions. A function is fine, > >but there is nothing about either of these that needs to be coded as a > >function, and functions use environment space (which I already hog up > >with a lot of stuff). > I might be mistaken here, but I don't think the environment is > effectively limited, e.g.: > $ foo=`man bash` # store the entire bash man page in variable foo > $ bar=$foo$foo$foo$foo # x4 > $ baz=$bar$bar$bar$bar # x16 > $ echo $baz | wc -c # how many characters? > 4287168 > -Beej Beej, I'm in a gray zone. I'm not really sure what I'm doing so it could easily be that I'm missing something. What happened to me is that I have a menuing system called SAM. It is made from some scripts, functions and just a few C executables. It works by controlling the PATH variable and thus making a bunch of new commands available. In the process it hogs up a bunch of environment space by defining and exporting a bunch of variables and functions. SAM is a great tool, although I'm the only person in the world who uses it. One problem I had with it was that it would sometimes fail with an error message from xargs. I tracked it down and found the code in xargs (see source/a/findutils/findutils-4.1.7.tar.gz on disk three of Slackware 10.2) that was giving me the error message. I changed the code and recompiled and now it works fine. Theres a limit in the code "20 * 1024". I've lost my documentation, but I think I'm up to "80 * 1024" now. I've had to bump it up more that once. Here's the pertinent xargs code unchanged: vvv /* Sanity check for systems with huge ARG_MAX defines (e.g., Suns which have it at 1 meg). Things will work fine with a large ARG_MAX but it will probably hurt the system more than it needs to; an array of this size is allocated. */ if (arg_max > 20 * 1024) arg_max = 20 * 1024; /* Take the size of the environment into account. */ arg_max -= env_size (environ); if (arg_max <= 0) error (1, 0, _("environment is too large for exec")); ^^^ See the message about "environment space"? That's what I'm talking about. Yes, I believe you can load up the environment (unimpeded), but the way I'm doing it causes xargs trouble when I'm using SAM. (I don't recall if there were other problems outside of SAM.) I'd like to know more about what is happening, because I've never gotten to the bottom of this. I don't understand what xargs does and I don't understand the meaning of variable arg_max. Also I don't know if the problem I'm having is a sign of some pathology in SAM or if I'm just hogging up to much environment space. Anyway, my fix worked. I was blissful in my ignorance. Now I'm worried. Did I mess up somewhere? -Joe |
|
|
|
#20 |
|
Guest
Posts: n/a
|
Re: installpkg -warn is broken
Tom N <tom@somewhere.invalid> wrote:
> What is it that you expect it do? My guess is that he wanted it to do something like this: tar -tvf foo-2.3.1-i486-1.tgz | colrm 1 48 | egrep -v '/$' | \ ( cd / ; xargs ls ) 2> /dev/null regards Henrik -- The address in the header is only to prevent spam. My real address is: hc1(at)poolhem.se Examples of addresses which go to spammers: root@localhost postmaster@localhost |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |