if I were to make a pkg-add diff

classic Classic list List threaded Threaded
47 messages Options
123
Reply | Threaded
Open this post in threaded view
|

if I were to make a pkg-add diff

Luke Small
I can't type underscore on this device.

Assuming i could do it: If I were to make a sloppy perl-based pkg-add
program that used c and the installer code to (re)set the PKG-PATH
environment variable using the "http" settings that are available for
installing the modules from mirrors, if I made changes to it to
request a change to the environment variable and possibly alter a
.profile if either the PKG-PATH doesn't exist, or a connection to the
mirror takes too long, would the openbsd devs accept the diff?
Theoretically, it wouldn't act much differently than the existing
installer code, except it would be on pkg-add after the system has
been installed.

--
-Luke

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Ingo Schwarze
Hi,

pkg_add(1) is about the hardest program in base to get patches into,
even for experienced developers who know what they are doing, even
if the patches are of reasonable quality and well thought out.
Almost all of my own attempts at improving it led to nowhere, with
very few exceptions for very simple fixes of the most obvious bugs,
and even those exceptions were almost never easy to bring to fruition.
I say that after having committed more than 2.000 times in very
diverse parts of OpenBSD.  pkg_add(1) is very hard and no place at
all for beginners.

The responsible developer is both chronically overworked and very
picky about keeping the structure of the program in a particular
style, and that style is *extremely* unsusual and extremely hard
to read, understand, and maintain.  I'm saying that as someone who
has been doing professional, object-oriented Perl programming in
the software industry for more than half a decade.

So Luke, don't bother submitting patches to pkg_add(1).  Don't
bother doing *anything* in a sloppy way for OpenBSD, that would be
nothing but a waste of time.  We expect very careful work even for
the smallest suggestions.  What you are thinking about is ridiculously
high over your head.

Besides, you are not making any sense whatsoever.  You probably
shouldn't try to submit any patches whatsoever, but instead try to
acquire basic skills using the system in simple ways and expressing
your thoughts clearly.

Yours,
  Ingo

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Ted Unangst-6
In reply to this post by Luke Small
Luke Small wrote:
> Assuming i could do it: If I were to make a sloppy perl-based pkg-add
> program that used c and the installer code to (re)set the PKG-PATH
> environment variable using the "http" settings that are available for
> installing the modules from mirrors, if I made changes to it to
> request a change to the environment variable and possibly alter a
> .profile if either the PKG-PATH doesn't exist, or a connection to the
> mirror takes too long, would the openbsd devs accept the diff?

Quality diffs that fix problems are welcome.

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Luke Small
In reply to this post by Ingo Schwarze
I wanna make a c program that checks for a PKG_PATH that exists and
connects to a workable link for pkg_add(). If you ever upgraded using
http mirrors on the install disk, it offers list# which links directly
to numbered mirrors. It would likely ease the initial startup for
whomever uses it while not burdening anybody that has already properly
configured their system for pkg_add. Most notably, there won't be any
JavaScript text-based GUI. ;)

On 12/24/15, Ingo Schwarze <[hidden email]> wrote:

> Hi,
>
> pkg_add(1) is about the hardest program in base to get patches into,
> even for experienced developers who know what they are doing, even
> if the patches are of reasonable quality and well thought out.
> Almost all of my own attempts at improving it led to nowhere, with
> very few exceptions for very simple fixes of the most obvious bugs,
> and even those exceptions were almost never easy to bring to fruition.
> I say that after having committed more than 2.000 times in very
> diverse parts of OpenBSD.  pkg_add(1) is very hard and no place at
> all for beginners.
>
> The responsible developer is both chronically overworked and very
> picky about keeping the structure of the program in a particular
> style, and that style is *extremely* unsusual and extremely hard
> to read, understand, and maintain.  I'm saying that as someone who
> has been doing professional, object-oriented Perl programming in
> the software industry for more than half a decade.
>
> So Luke, don't bother submitting patches to pkg_add(1).  Don't
> bother doing *anything* in a sloppy way for OpenBSD, that would be
> nothing but a waste of time.  We expect very careful work even for
> the smallest suggestions.  What you are thinking about is ridiculously
> high over your head.
>
> Besides, you are not making any sense whatsoever.  You probably
> shouldn't try to submit any patches whatsoever, but instead try to
> acquire basic skills using the system in simple ways and expressing
> your thoughts clearly.
>
> Yours,
>   Ingo
>


--
-Luke

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Theo de Raadt-2
In reply to this post by Luke Small
>I wanna make a c program that checks for a PKG_PATH that exists and
>connects to a workable link for pkg_add().

and I wanna build a rocket ship...

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Peter Hessler
In reply to this post by Luke Small
On 2015 Dec 24 (Thu) at 20:23:38 -0600 (-0600), Luke Small wrote:
:I wanna make a c program that checks for a PKG_PATH that exists and
:connects to a workable link for pkg_add(). If you ever upgraded using
:http mirrors on the install disk, it offers list# which links directly
:to numbered mirrors. It would likely ease the initial startup for
:whomever uses it while not burdening anybody that has already properly
:configured their system for pkg_add. Most notably, there won't be any
:JavaScript text-based GUI. ;)
:

update /etc/pkg.conf then.....



--
Quick!!  Act as if nothing has happened!

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Luke Small
In reply to this post by Theo de Raadt-2
I suspect that if you did, it wouldn't check whether there was an
astronaut ready to control the on-board computer and would sit there
continuously trying to rev the rocket engines with no jet fuel. That
is the way pkg-add acts right now. I felt pretty ridiculous wondering
why pkg-add wasn't working only to figure out I was working with a
mirror that was no longer active this week.

On 12/24/15, Theo de Raadt <[hidden email]> wrote:
>>I wanna make a c program that checks for a PKG_PATH that exists and
>>connects to a workable link for pkg_add().
>
> and I wanna build a rocket ship...
>


--
-Luke

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Luke Small
I suppose folks could opt for the more stable yet higher latency
official mirrors even if they aren't local to canada and they would
never be surprised. It may not be too much trouble for me to implement
a mere stdout statement in the perl pkg-add to advise the user to
update PKG-PATH to randomly offer one of the official mirrors as the
PKG-PATH (as an easy to implement fix) and steer the user to install a
web-browser to discover the current list of http/ftp package mirrors
if Firefox or lynx exists on the system; since they don't by default.
It wouldn't be too dissimilar to the kind of messages delivered by
pkg-add itself to rm folder contents at the end of a run.

On 12/25/15, Luke Small <[hidden email]> wrote:

> I suspect that if you did, it wouldn't check whether there was an
> astronaut ready to control the on-board computer and would sit there
> continuously trying to rev the rocket engines with no jet fuel. That
> is the way pkg-add acts right now. I felt pretty ridiculous wondering
> why pkg-add wasn't working only to figure out I was working with a
> mirror that was no longer active this week.
>
> On 12/24/15, Theo de Raadt <[hidden email]> wrote:
>>>I wanna make a c program that checks for a PKG_PATH that exists and
>>>connects to a workable link for pkg_add().
>>
>> and I wanna build a rocket ship...
>>
>
>
> --
> -Luke
>


--
-Luke

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Christoph R. Winter
Luke, ... Are you sure that you're not in politics ?

> I suppose folks could opt for the more stable yet higher latency
> official mirrors even if they aren't local to canada and they would
> never be surprised. It may not be too much trouble for me to implement
> a mere stdout statement in the perl pkg-add to advise the user to
> update PKG-PATH to randomly offer one of the official mirrors as the
> PKG-PATH (as an easy to implement fix) and steer the user to install a
> web-browser to discover the current list of http/ftp package mirrors
> if Firefox or lynx exists on the system; since they don't by default.
> It wouldn't be too dissimilar to the kind of messages delivered by
> pkg-add itself to rm folder contents at the end of a run.
>
> On 12/25/15, Luke Small <[hidden email]> wrote:
>> I suspect that if you did, it wouldn't check whether there was an
>> astronaut ready to control the on-board computer and would sit there
>> continuously trying to rev the rocket engines with no jet fuel. That
>> is the way pkg-add acts right now. I felt pretty ridiculous
>> wondering
>> why pkg-add wasn't working only to figure out I was working with a
>> mirror that was no longer active this week.
>>
>> On 12/24/15, Theo de Raadt <[hidden email]> wrote:
>>>>I wanna make a c program that checks for a PKG_PATH that exists and
>>>>connects to a workable link for pkg_add().
>>>
>>> and I wanna build a rocket ship...
>>>
>>
>>
>> --
>> -Luke

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Mihai Popescu-3
In reply to this post by Luke Small
> if I were to make a pkg-add diff

Mr. Skywalker, make that damn modification for yourself if you really
think it helps you.
If you want you can send a diff, too, but please go away with these
idiotic talks about what you can do but you will not.

I guarantee you that nobody will be upset when you tweak that pkg_add
and friends and keep it for yourself. The BSD licence permits that.

Now, go away, please and don't hijack the threads anymore.

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

dan mclaughlin
In reply to this post by Luke Small
On Fri, 25 Dec 2015 16:09:27 -0600 Luke Small <[hidden email]> wrote:

> I suppose folks could opt for the more stable yet higher latency
> official mirrors even if they aren't local to canada and they would
> never be surprised. It may not be too much trouble for me to implement
> a mere stdout statement in the perl pkg-add to advise the user to
> update PKG-PATH to randomly offer one of the official mirrors as the
> PKG-PATH (as an easy to implement fix) and steer the user to install a
> web-browser to discover the current list of http/ftp package mirrors
> if Firefox or lynx exists on the system; since they don't by default.
> It wouldn't be too dissimilar to the kind of messages delivered by
> pkg-add itself to rm folder contents at the end of a run.

talk is cheap. if you see a problem, show a fix instead of talking about it.
(i am really starting to feel for the devs. this gets wearying.)

so lynx is gone, but you don't need to install a web browser. ftp(1) is in
base and functions quite well. you want the mirrors?

ftp -o - http://www.openbsd.org/ftp.html | more

will display the html source of the page, which is pretty easy to read even
unrendered.

if you wanted to format it better, you could do:

ftp -o - http://www.openbsd.org/ftp.html | \
sed -n \
    -e 's:</a>$::' \
    -e 's: <strong>\([^<]*\)<.*:\1 :p' \
    -e 's:^\( [hfr].*\):\1:p'

(all whitespace in the above sed are single tabs, copy & paste will not work)

will display them all (http,ftp,rsync) as below:

Australia (Adelaide)
        http://mirror.internode.on.net/pub/OpenBSD/
Australia (Brisbane)
        http://mirror.aarnet.edu.au/pub/OpenBSD/
Australia (Perth)
        http://ftp.iinet.net.au/pub/OpenBSD/
...


if you want to test a mirror, just use ftp's return value as below:

ftp -VM -o /dev/null $MIRROR && echo "$MIRROR" >>good-mirrors

or if you had a list of possible mirrors (in file 'mirrors'):

for MIRROR in $(< mirrors); do
  ftp -VM -o /dev/null $MIRROR && echo "$MIRROR"
done >good-mirrors

whenever i want something to work the way i want, i just script around it.
the beauty of unix.

>
> On 12/25/15, Luke Small <[hidden email]> wrote:
> > I suspect that if you did, it wouldn't check whether there was an
> > astronaut ready to control the on-board computer and would sit there
> > continuously trying to rev the rocket engines with no jet fuel. That
> > is the way pkg-add acts right now. I felt pretty ridiculous wondering
> > why pkg-add wasn't working only to figure out I was working with a
> > mirror that was no longer active this week.
> >
> > On 12/24/15, Theo de Raadt <[hidden email]> wrote:
> >>>I wanna make a c program that checks for a PKG_PATH that exists and
> >>>connects to a workable link for pkg_add().
> >>
> >> and I wanna build a rocket ship...
> >>
> >
> >
> > --
> > -Luke
> >
>
>
> --
> -Luke

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Christoph R. Winter
Quote from dan mclaughlin :

[ ... ]
> (i am really starting to feel for the devs. this gets wearying.)
[ ... ]
> whenever i want something to work the way i want, i just script around
> it.
> the beauty of unix.

Explains it very good. I personally think, OpenBSD is simple not for
Luke. What Luke does, is simple unfair towards the developers and also
towards new users which are willing to learn and maybe use OpenBSD
only as users.

For Luke, read the following :

http://www.openbsd.org/mail.html

Do your homework before you post
[ ... ] the FAQ and the relevant man pages (start with afterboot(8)),
and check the mailing list archives. We want to help, but we wouldn't
want to deprive you of a valuable learning experience, and no one
wants to see the same question on the lists for the fifth time in a
month.

Respect differences in opinion and philosophy
Intelligent people may look at the same set of facts and come to very
different conclusions. Repeating the same points that didn't convince
someone previously rarely changes their mind and irritates all the
other readers.

http://www.openbsd.org/faq/index.html

8.14 - What web browsers are available for OpenBSD? - for lynx and the
relevant discussions about it at misc@.

14.6 - Soft Updates - for softdep

8.21 - Does OpenBSD support any journaling filesystems? - for softdep
yes or no.

1.11 - Why is/isn't ProductX included?
Why isn't there a graphical or curses(3) based installer?
For a number of reasons, including the goal of keeping the
installation boot media able to be a single floppy disk, the fact that
one installer can be used on all platforms in all configurations, and
the fact that after the second or third OpenBSD install, most users
find the OpenBSD installation system among the fastest and easiest
installers of any OS. Most developers and users greatly prefer the
speed, power, and ease of use of the current installer to any of the
more "colorful" or "pretty" installers on some other platforms.

In most cases, these topics have been discussed in painful detail on
the mail lists, please see archives if you need more information. -
for your (Javascript) installer idea.

14.2 - Using fdisk(8)
14.3 - Using OpenBSD's disklabel(8)
14.21 - How do I use softraid(4)? + man page - for full disc encryption.

And yes, it is expected, that you can handle this tools befor
installing the system !

15.2.2 - Making things easy: PKG_PATH - to define more then one mirrors.

You should stop to reninvent the wheel or, to create problems where
are none.
You should start to RTFM (Reed The Fucking Manuals) or, buy a OpenBSD
relevant book - as others also did.
You also should do the following *shutup and hack* instead of always
complaining.

Let's say your idea for pkg_add is cool, let's say you make a clean
install or a update using bsd.rd and, let's also say, that you have no
supported network device - without the firmware from
firmware.openbsd.org ... what's next ?

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Stuart Henderson
In reply to this post by dan mclaughlin
On 2015-12-26, dan mclaughlin <[hidden email]> wrote:
> ftp -o - http://www.openbsd.org/ftp.html | more
>
> will display the html source of the page, which is pretty easy to read even
> unrendered.

No need to parse the html,

ftp -o - http://www.openbsd.org/build/mirrors.dat | grep -e ^U -e ^G[CITS]

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Luke Small
In reply to this post by Christoph R. Winter
I just figure that adding a little complexity that doesn't adversely
affect security, to ease initial entry into the system for new users
could be good. pkg_add initialization and mirror selection can be
automated in a way to not discourage someone from picking up a fresh
install and running with it. Maybe I could even add an automatic
pinging heuristic to select the lowest latency mirror.

On 12/26/15, Christoph R. Murauer <[hidden email]> wrote:

> Quote from dan mclaughlin :
>
> [ ... ]
>> (i am really starting to feel for the devs. this gets wearying.)
> [ ... ]
>> whenever i want something to work the way i want, i just script around
>> it.
>> the beauty of unix.
>
> Explains it very good. I personally think, OpenBSD is simple not for
> Luke. What Luke does, is simple unfair towards the developers and also
> towards new users which are willing to learn and maybe use OpenBSD
> only as users.
>
> For Luke, read the following :
>
> http://www.openbsd.org/mail.html
>
> Do your homework before you post
> [ ... ] the FAQ and the relevant man pages (start with afterboot(8)),
> and check the mailing list archives. We want to help, but we wouldn't
> want to deprive you of a valuable learning experience, and no one
> wants to see the same question on the lists for the fifth time in a
> month.
>
> Respect differences in opinion and philosophy
> Intelligent people may look at the same set of facts and come to very
> different conclusions. Repeating the same points that didn't convince
> someone previously rarely changes their mind and irritates all the
> other readers.
>
> http://www.openbsd.org/faq/index.html
>
> 8.14 - What web browsers are available for OpenBSD? - for lynx and the
> relevant discussions about it at misc@.
>
> 14.6 - Soft Updates - for softdep
>
> 8.21 - Does OpenBSD support any journaling filesystems? - for softdep
> yes or no.
>
> 1.11 - Why is/isn't ProductX included?
> Why isn't there a graphical or curses(3) based installer?
> For a number of reasons, including the goal of keeping the
> installation boot media able to be a single floppy disk, the fact that
> one installer can be used on all platforms in all configurations, and
> the fact that after the second or third OpenBSD install, most users
> find the OpenBSD installation system among the fastest and easiest
> installers of any OS. Most developers and users greatly prefer the
> speed, power, and ease of use of the current installer to any of the
> more "colorful" or "pretty" installers on some other platforms.
>
> In most cases, these topics have been discussed in painful detail on
> the mail lists, please see archives if you need more information. -
> for your (Javascript) installer idea.
>
> 14.2 - Using fdisk(8)
> 14.3 - Using OpenBSD's disklabel(8)
> 14.21 - How do I use softraid(4)? + man page - for full disc encryption.
>
> And yes, it is expected, that you can handle this tools befor
> installing the system !
>
> 15.2.2 - Making things easy: PKG_PATH - to define more then one mirrors.
>
> You should stop to reninvent the wheel or, to create problems where
> are none.
> You should start to RTFM (Reed The Fucking Manuals) or, buy a OpenBSD
> relevant book - as others also did.
> You also should do the following *shutup and hack* instead of always
> complaining.
>
> Let's say your idea for pkg_add is cool, let's say you make a clean
> install or a update using bsd.rd and, let's also say, that you have no
> supported network device - without the firmware from
> firmware.openbsd.org ... what's next ?
>
>
>


--
-Luke

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Luke Small
Come to think about it, it might to be good to do tiny standalone
program called pkg_ping and then I could make it in C like I'd prefer.
I'd hope to make a port maybe, but then it would functionally defeat
the intent.

On 12/26/15, Luke Small <[hidden email]> wrote:

> I just figure that adding a little complexity that doesn't adversely
> affect security, to ease initial entry into the system for new users
> could be good. pkg_add initialization and mirror selection can be
> automated in a way to not discourage someone from picking up a fresh
> install and running with it. Maybe I could even add an automatic
> pinging heuristic to select the lowest latency mirror.
>
> On 12/26/15, Christoph R. Murauer <[hidden email]> wrote:
>> Quote from dan mclaughlin :
>>
>> [ ... ]
>>> (i am really starting to feel for the devs. this gets wearying.)
>> [ ... ]
>>> whenever i want something to work the way i want, i just script around
>>> it.
>>> the beauty of unix.
>>
>> Explains it very good. I personally think, OpenBSD is simple not for
>> Luke. What Luke does, is simple unfair towards the developers and also
>> towards new users which are willing to learn and maybe use OpenBSD
>> only as users.
>>
>> For Luke, read the following :
>>
>> http://www.openbsd.org/mail.html
>>
>> Do your homework before you post
>> [ ... ] the FAQ and the relevant man pages (start with afterboot(8)),
>> and check the mailing list archives. We want to help, but we wouldn't
>> want to deprive you of a valuable learning experience, and no one
>> wants to see the same question on the lists for the fifth time in a
>> month.
>>
>> Respect differences in opinion and philosophy
>> Intelligent people may look at the same set of facts and come to very
>> different conclusions. Repeating the same points that didn't convince
>> someone previously rarely changes their mind and irritates all the
>> other readers.
>>
>> http://www.openbsd.org/faq/index.html
>>
>> 8.14 - What web browsers are available for OpenBSD? - for lynx and the
>> relevant discussions about it at misc@.
>>
>> 14.6 - Soft Updates - for softdep
>>
>> 8.21 - Does OpenBSD support any journaling filesystems? - for softdep
>> yes or no.
>>
>> 1.11 - Why is/isn't ProductX included?
>> Why isn't there a graphical or curses(3) based installer?
>> For a number of reasons, including the goal of keeping the
>> installation boot media able to be a single floppy disk, the fact that
>> one installer can be used on all platforms in all configurations, and
>> the fact that after the second or third OpenBSD install, most users
>> find the OpenBSD installation system among the fastest and easiest
>> installers of any OS. Most developers and users greatly prefer the
>> speed, power, and ease of use of the current installer to any of the
>> more "colorful" or "pretty" installers on some other platforms.
>>
>> In most cases, these topics have been discussed in painful detail on
>> the mail lists, please see archives if you need more information. -
>> for your (Javascript) installer idea.
>>
>> 14.2 - Using fdisk(8)
>> 14.3 - Using OpenBSD's disklabel(8)
>> 14.21 - How do I use softraid(4)? + man page - for full disc encryption.
>>
>> And yes, it is expected, that you can handle this tools befor
>> installing the system !
>>
>> 15.2.2 - Making things easy: PKG_PATH - to define more then one mirrors.
>>
>> You should stop to reninvent the wheel or, to create problems where
>> are none.
>> You should start to RTFM (Reed The Fucking Manuals) or, buy a OpenBSD
>> relevant book - as others also did.
>> You also should do the following *shutup and hack* instead of always
>> complaining.
>>
>> Let's say your idea for pkg_add is cool, let's say you make a clean
>> install or a update using bsd.rd and, let's also say, that you have no
>> supported network device - without the firmware from
>> firmware.openbsd.org ... what's next ?
>>
>>
>>
>
>
> --
> -Luke
>


--
-Luke

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Raf Czlonka-2
In reply to this post by Luke Small
On Sun, Dec 27, 2015 at 01:40:04AM GMT, Luke Small wrote:

> pkg_add initialization and mirror selection can be automated ...

As already mentioned here, this part is already done during
installation. One can either accept the suggested mirror or choose one
manually from the list, your choice is then saved in '/etc/pkg.conf' -
not the same thing as setting up PKG_PATH but is sufficient for pkg_*
use.

Raf

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Raf Czlonka-2
In reply to this post by Luke Small
On Sun, Dec 27, 2015 at 01:58:53AM GMT, Luke Small wrote:

> Come to think about it, it might to be good to do tiny standalone
> program called pkg_ping and then I could make it in C like I'd prefer.
> I'd hope to make a port maybe, but then it would functionally defeat
> the intent.

I think you're wasting your time and skills - a service akin to Debian's
redirector[0] would be much better!

Raf

[0] http://httpredir.debian.org/

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Christoph R. Winter
In reply to this post by Luke Small
> Come to think about it, it might to be good to do tiny standalone
> program called pkg_ping and then I could make it in C like I'd prefer.
> I'd hope to make a port maybe, but then it would functionally defeat
> the intent.

I find it not usefull to continue this kind of conversation because
you don't listen to others.

Make what you have planned, send a diff and, let's wait what the
future brings. Personally I see no benefit in this ideas.

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Stuart Henderson
In reply to this post by Raf Czlonka-2
On 2015-12-27, Raf Czlonka <[hidden email]> wrote:

> On Sun, Dec 27, 2015 at 01:58:53AM GMT, Luke Small wrote:
>
>> Come to think about it, it might to be good to do tiny standalone
>> program called pkg_ping and then I could make it in C like I'd prefer.
>> I'd hope to make a port maybe, but then it would functionally defeat
>> the intent.
>
> I think you're wasting your time and skills - a service akin to Debian's
> redirector[0] would be much better!
>
> Raf
>
> [0] http://httpredir.debian.org/

This would work for releases, though unless pkg_add was changed to cache
the redirect it would slow things down compared to fetching directly from
the mirror.

For snapshots, caching the redirect would be essential, otherwise it
could switch mirror mid-update, and it is common that mirrors are not all
in-sync.

Caching the redirect is a bigger change than it seems because pkg_add
doesn't have its own network code but defers to $FETCH_CMD which could
be one of a number of programs.

(yes this has been thought about already :)

I think the best that can be done relatively easily would be to have
pkg_add fetch ftplist.cgi and pick the first result as a default if
neither pkg.conf nor PKG_PATH are set.

Reply | Threaded
Open this post in threaded view
|

Re: if I were to make a pkg-add diff

Luke Small
In reply to this post by Christoph R. Winter
I guess I didn't really answer your question. It wouldn't rely upon
the ramdisk. It is meant to run after install. So it would presumably
have all the firmware. I was thinking about running it similarly to
the install output though. I setup a local mirror once and it crapped
out after a while and just kept running, waiting for a connection
without any output. I think that it would be kinda neat to have
something that could potentially lead you to a new mirror that is
faster than maybe a mirror you chose manually. I wasn't aware that the
installer component that I was referencing edited pkg.conf . I don't
know how to calculate the "freshness" of a mirror, like the Debian
program other than by testing their latency. I suspect that even with
the best O(1) network calculation, you aren't really going to get the
best result.


--
-Luke

123