[pacman-dev] makepkg portability (was:10530: checksum verification does not work on BSD)

Dan McGee dpmcgee at gmail.com
Mon Jun 2 08:04:10 EDT 2008


*PLEASE* edit the subject when you drift to another topic. Yes,
portability is NOT the original topic of this thread; checksum
verification on BSD systems is the original topic which is quite a bit
narrower in scope.

On Mon, Jun 2, 2008 at 6:54 AM, Antonio Huete Jimenez
<ahuete.devel at gmail.com> wrote:
>
>
> 2008/6/2 Allan McRae <mcrae_allan at hotmail.com>:
>>
>> Antonio Huete Jimenez wrote:
>> >
>> > And there comes the idea I was talking about. I think that scripts
>> > should behave according to the operating from where they are running
>> > on. I'm doing some changes to scripts for doing so, but it will take
>> > me few days to have something useable.
>> > I also think that every portable code should be welcome whenever it
>> > doesn't break anything in ArchLinux and made scripts runnable on other
>> > OSes.
>> >
>> > What do you guys think?
>>
>> Using openssl for this is optimal because it works the same on all
>> systems.  Having code which detects operating system and uses specific
>> software in each case is ugly and should be avoided if at all possible.
>>
> And how do you plan to do OS specific checks and/or configurations for
> portability?

The whole point is avoiding situations when we do need OS-specific
checks and configurations. Take a look at the pacman and libalpm code-
you will notice no checks for definitions of things like LINUX, BSD,
DARWIN, CYGWIN (well one of these, but its documented and explained),
etc.

Portability means "runs everywhere", not "has a case in a switch
statement for each platform".

-Dan




More information about the pacman-dev mailing list