pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkgtools/pkgin: compatibility patch for GNU sed


I had trouble getting pkgin to work on various Linux platforms.
"pkgin update" would always segfault.
Reason: it never created an empty database to begin with, and crashed after
trying to read column names from a "PRAGMA table_info" SQL command.

The SQL commands for db creation are stored in pkgin.sql and get
post-processed in to escape newlines and apostrophes with
backslashes. This is done using sed, using "-E" to request extended regex
syntax. But GNU sed needs "-r" to do that. then fails and
leaves an empty CREATE_DRYDB define.

The attached patch checks for GNU sed and then uses the correct switch.

Best regards

Attachment: patch-ba
Description: Binary data

Home | Main Index | Thread Index | Old Index