Fix setMaintainer (#14)
* Fix brackets of maintainer email The email address of the maintainer must use angle brackes as per https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Maintainer Also there should be a space between name and email. * Use variable interpolation for maintainer name Since you already use interpolation for maintainer email you can use it for name too. * Fix default value for maintainer The default value for the maintainer still had the square brackets. * Fix tests for StandardFile The tests still used square brackets.
This commit is contained in:
parent
eb7402f531
commit
c2fa2ffd7f
|
@ -44,7 +44,7 @@ class StandardFile
|
|||
"Recommends" => false,
|
||||
"Suggests" => false,
|
||||
"Installed-Size" => 1024,
|
||||
"Maintainer" => "name [email]",
|
||||
"Maintainer" => "name <email>",
|
||||
"Conflicts" => false,
|
||||
"Replaces" => false,
|
||||
"Provides" => "your-company",
|
||||
|
@ -109,7 +109,7 @@ class StandardFile
|
|||
public function setMaintainer($maintainer, $email = false)
|
||||
{
|
||||
$email = ($email) ? $email : "---";
|
||||
return $this->_setProperty("Maintainer", $maintainer . "[{$email}]");
|
||||
return $this->_setProperty("Maintainer", "{$maintainer} <{$email}>");
|
||||
}
|
||||
|
||||
public function setConflicts($conflicts)
|
||||
|
|
|
@ -21,7 +21,7 @@ Priority: optional
|
|||
Architecture: all
|
||||
Essential: no
|
||||
Installed-Size: 1024
|
||||
Maintainer: name [email]
|
||||
Maintainer: name <email>
|
||||
Provides: your-company
|
||||
Description: Your description
|
||||
|
||||
|
@ -46,7 +46,7 @@ OEF;
|
|||
$this->object["Architecture"] = "x86";
|
||||
$this->object["Essential"] = "yes";
|
||||
$this->object["Installed-Size"] = "2048";
|
||||
$this->object["Maintainer"] = "Walter Dal Mut [walter.dalmut at gmail dot com]";
|
||||
$this->object["Maintainer"] = "Walter Dal Mut <walter.dalmut at gmail dot com>";
|
||||
$this->object["Provides"] = "Corley SRL";
|
||||
$this->object["Description"] = "My Desc";
|
||||
$this->object["Depends"] = "php5-cli";
|
||||
|
@ -63,7 +63,7 @@ Essential: yes
|
|||
Depends: php5-cli
|
||||
Recommends: php5-curl
|
||||
Installed-Size: 2048
|
||||
Maintainer: Walter Dal Mut [walter.dalmut at gmail dot com]
|
||||
Maintainer: Walter Dal Mut <walter.dalmut at gmail dot com>
|
||||
Provides: Corley SRL
|
||||
Description: My Desc
|
||||
|
||||
|
|
Loading…
Reference in a new issue